package com.vanke.devops.domain.domain.schedulejob.impl;


import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.vanke.devops.dal.dao.ScheduleJobLogMapper;
import com.vanke.devops.dal.model.ScheduleJobLog;
import com.vanke.devops.domain.domain.schedulejob.IScheduleJobLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.vanke.devops.domain.base.BaseServiceImpl;

import java.util.List;

/**
 * <p>
 * 用户表  服务实现类
 * </p>
 *
 * @author 陈景阳
 * @since 2018-06-08
 */
@Service
public class ScheduleJobLogServiceImpl extends BaseServiceImpl<ScheduleJobLogMapper, ScheduleJobLog> implements IScheduleJobLogService {

    @Override
    public Page<ScheduleJobLog> page(Integer pageNo, Integer pageSize) {
        Page<ScheduleJobLog> page = new Page<>(pageNo,pageSize);
        List<ScheduleJobLog> list = baseMapper.selectPage(page,new EntityWrapper<>());
        page.setRecords(list);
        return page;
    }

    @Override
    public void jobAdd(ScheduleJobLog entity) {
        baseMapper.insert(entity);
    }
}